﻿using MyX.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyX.Message
{
    public class XWorkStatus : XMessage
    {
        public XWorkStatus(Guid sourceMessageID) : base()
        {
            IsSuccess = true;
            IsHandle = false;
            SourceMessageID = sourceMessageID;
        }

        /// <summary>
        /// 来源消息ID
        /// </summary>
        public Guid SourceMessageID { get; set; }

        /// <summary>
        /// 处理是否成功
        /// </summary>
        public bool IsSuccess { get; set; }


        /// <summary>
        /// 是否真正被处理
        /// </summary>
        public bool IsHandle { get; set; }
        /// <summary>
        /// 处理结果描述
        /// </summary>
        [XAllowNull]
        public string Result { get; set; }

        /// <summary>
        /// 处理中发生的异常
        /// </summary>
        [XAllowNull]
        public Exception Exception { get; set; }
    }
}
